﻿using System.Windows.Controls;
using nRoute.Navigation.Mapping;

namespace nRoute.Samples.FutureDesktop.Views.Images
{
    [MapNavigationContent("Images/Energy")]
    public partial class ScienceAnimation 
        : UserControl
    {
        private bool _paused;

        public ScienceAnimation()
        {
            InitializeComponent();

            this.Loaded += (s, e) => this.SunshineStoryboard.Begin();
            this.MouseLeftButtonDown += (s, e) =>
            {
                if (_paused)
                    this.SunshineStoryboard.Resume();
                else
                    this.SunshineStoryboard.Pause();
                _paused = !_paused;
            };
        }

    }
}
